<div id="ticket" class="vt">

<div id="actions">
	<?php echo $bug->getEditLink() ?>
</div>

<h1>#<?php echo $bug->getID() ?> - <?php echo $bug->getSummary() ?></h1>

<span class="label">Created:</span> <?php echo $bug->getCreatedAt() ?> | 
<span class="label">Updated:</span> <?php echo $bug->getUpdatedAt() ?>

<div class="label">Description:</div>
<div id="vtDesc"><?php echo $bug->getDescription() ?></div>

<div class="label">Details:</div>
<table style="width: 100%">
	<tr valign="top">
		<td class="label" width="25%">Priority:</td>
		<td width="25%"><?php echo $bug->getPriority() ?></td>
		
		<td class="label" width="25%">Assigned to:</td>
		<td width="25%"><?php echo ($bug->getOwner()) ? $bug->getOwner() : '<i>Unassigned</i>' ?></td>
	</tr>
	<tr valign="top">
		<td class="label" width="25%">Milestone:</td>
		<td width="25%"><?php echo ($bug->getMilestone()) ? $bug->getMilestone() : '<i>None</i>' ?></td>
		<td class="label" width="25%">Due Date:</td>
		<td width="25%"><?php echo ($bug->getDueDate()) ? $bug->getDueDate() : '<i>None<i>' ?></td>
	</tr>
	<tr valign="top">
		<td class="label" width="25%">Type</td>
		<td width="25%"><?php echo $bug->getType() ?></td>
		<td class="label" width="25%">Status:</td>
		<td width="25%"><?php echo $bug->getStatus() ?></td>
	</tr>
</table>

<div id="vtComments">
	<h2>Comments:</h2>
	<?php if(count($bug->getComments()) == 0): ?>
	<h4><i>No comments yet...</i></h4>
	<?php else: ?>
	<?php foreach($bug->getComments() as $i => $comment): ?>
		<div id="comment<?php echo $i ?>" class="comment">			
			<div class="commentTitle"><?php echo ($i+1)." - By {$comment->getUser()} @ {$comment->getCreatedAt()}:" ?></div>
			<div class="commentText"><?php echo (strlen($comment->getContent()) > 0) ? $comment->getContent() : 'No comment...' ?></div>
			<div class="commentActions"><b>Actions:</b> <span class="commentAction"><?php echo $comment->getActions() ?></span></div>
		</div>
	<?php endforeach ?>
	<?php endif ?>
	
	<?php include_partial('bugcommentform', array('bug' => $bug, 'form' => $form)) ?>
</div>

</div>